const mongoose = require('mongoose');
const questionSource = require('./src/models/QuestionSource');
const { db } = require('./src/utils/db/config');

// 连接数据库
db.connect();

// 查询所有文档的_id
questionSource.find({}, '_id').lean().exec()
  .then(docs => {
    // console.log('Document IDs:');
    docs.forEach(doc => console.log(doc._id));
    process.exit(0);
  })
  .catch(err => {
    console.error('Error:', err);
    process.exit(1);
  });
